<?php use_stylesheets_for_form($form) ?>
<?php use_javascripts_for_form($form) ?>

<form id='sfForumAction'
	action="<?php echo url_for('sfForumCategory/'.($form->getObject()->isNew() ? 'create' : 'update').(!$form->getObject()->isNew() ? '?id='.$form->getObject()->getId() : '')) ?>"
	method="post"
	<?php $form->isMultipart() and print 'enctype="multipart/form-data" ' ?>>
	<?php if (!$form->getObject()->isNew()): ?> <input type="hidden"
	name="sf_method" value="put" /> <?php endif; ?>
<div class='myforummenu'><a
	href="<?php echo url_for('sfForumCategory/index') ?>"><img
	src='/images/back.png' />Вернуться к разделам</a></div>
<br />
<br />
<input type="hidden"
	value="<?php echo $sf_user->getGuardUser()->getId() ?>"
	name="sf_forum_category[author]" id="sf_forum_category_author" />
<table id="sfForumCategoryNew">
	<tfoot>
		<tr>
			<td colspan="2"><?php echo $form->renderHiddenFields(false) ?> &nbsp;
			<?php if (!$form->getObject()->isNew()): ?> &nbsp;<?php echo link_to('Delete', 'sfForumCategory/delete?id='.$form->getObject()->getId(), array('method' => 'delete', 'confirm' => 'Are you sure?')) ?>
			<?php endif; ?> <input class='forumbutton' type="submit"
				value="Сохранить" /></td>
		</tr>
	</tfoot>
	<tbody>
	<?php echo $form->renderGlobalErrors() ?>
		<tr>
			<th><?php echo $form['name']->renderLabel() ?></th>
			<td><?php echo $form['name']->renderError() ?> <?php echo $form['name'] ?>
			</td>
		</tr>
		<tr>
			<th><?php echo $form['description']->renderLabel() ?></th>
			<td><?php echo $form['description']->renderError() ?> <?php echo $form['description'] ?>
			</td>
		</tr>
		<!-- 
				      <tr>
				        <th><?php //echo $form['sf_guard_permission_list']->renderLabel() ?></th>
				        <td>
				          <?php //echo $form['sf_guard_permission_list']->renderError() ?>
				          <?php // echo $form['sf_guard_permission_list'] ?>
				        </td>
				      </tr>
				       -->
	</tbody>
</table>
</form>
